﻿(function () {
    'use strict';
    var moduleId = 'common';

    angular.module(moduleId, []);

    angular.module("common").factory('common',
        ['$q', '$rootScope', '$timeout', //buildin
         'httpRequestSvc', 'dataContext', 'inMemoryData',//custome
        common]);

    function common($q, $rootScope, $timeout,
        httpRequestSvc, dataContext, inMemoryData) {

        var service = {
            $broadcast: $broadcast,
            $q: $q,
            $timeout: $timeout,
            httpRequestSvc: httpRequestSvc,
            dataContext: dataContext,
            inMemoryData: inMemoryData
        };

        return service;

        function $broadcast() {
            return $rootScope.$broadcast.apply($rootScope, arguments);
        }
    }
})();